package com.gitee.wsl.net.client.bean

import com.gitee.wsl.net.client.authentication.Authorization


class HttpProtocol {
    /**
     * 对端主机ip或域名
     */
    private val host: String? = null

    /**
     * 对端主机端口
     */
    private val port: String? = null

    /**
     * http/https 请求访问的url链接
     */
    private val url: String? = null

    /**
     * http是否使用链路加密ssl/tls,即是http还是https
     */
    private val ssl = "false"

    /**
     * http请求方法: get, post, put, delete, patch
     */
    private val method: String? = null

    /**
     * http请求携带头 eg: Content-Type = application/json
     */
    private val headers: Map<String, String>? = null

    /**
     * http请求携带查询参数 eg: localhost:80/api?paramKey=value
     */
    private val params: Map<String, String>? = null

    /**
     * http请求携带的请求体
     */
    private val payload: String? = null

    /**
     * 认证信息
     */
    private val authorization: Authorization? = null

    /**
     * 响应数据解析方式
     * default - 自有的数据解析规则
     * json_path 自定义jsonPath脚本 https://www.jsonpath.cn/
     * xml_path 自定义xmlPath脚本
     * prometheus Prometheus数据规则
     */
    private val parseType: String? = null

    /**
     * 数据解析脚本 当解析方式为 jsonPath or xmlPath时存在
     */
    private val parseScript: String? = null

}